package com.loan.controller;

import com.loan.entity.SuccessApply;
import com.loan.service.SuccessApplyService;
import com.loan.utils.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author z
 */
@RestController
@RequestMapping("/successApply")
@Api(tags = "申请提额管理")
public class SuccessApplyController {
    @Resource
    private SuccessApplyService successApplyService;

    /**
     *申请贷款
     */
    @ApiOperation(value = "申请提额",httpMethod = "POST",notes = "申请提额")
    @PostMapping("/loanApply")
    public ResponseResult<?> loanApply(@ApiParam(value = "申请成功实体类",required = true)@RequestBody SuccessApply successApply){
        successApplyService.addSuccessLoanApply(successApply);
        return ResponseResult.success("申请提额成功");
    }


}
